import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', {
  state: () => ({
    isNPC: false,
    isSystem: false,
    currentCharacter: null,
    systemPrivileges: []
  }),
  actions: {
    setIdentity(identity) {
      this.isNPC = identity === 'npc'
      this.isSystem = identity === 'system'
    },
    setCharacter(character) {
      this.currentCharacter = character
    },
    addPrivilege(privilege) {
      this.systemPrivileges.push(privilege)
    }
  }
})